<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
	<head>
		<th:block th:include="include :: header('爬虫系统主页')"/>
		<style>
			#menu dl dd a{
				margin-left: 15px;
			}
		</style>
	</head>
	<body class="layui-layout-body">
		<div class="layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo" style="color: #fff;font-weight: bold;">
					SpiderMan for SpringBoot
				</div>
				<ul class="layui-nav layui-layout-left">
					<li class="layui-nav-item">
						<div class="layui-input-inline">
							<input type="text" class="layui-input" style="height: 28px;" placeholder="全文搜索" name="allSearch" />
						</div>
					</li>
				</ul>
				<ul class="layui-nav layui-layout-right" lay-filter="topNav">
					<li class="layui-nav-item">
						<a href="#">系统通知<span class="layui-badge">9</span></a>
					</li>
					<li class="layui-nav-item">
						<a href="#">帮助文档</a>
					</li>
					<li class="layui-nav-item">
						<a href="#">
							<img src="img/header.jpg" class="layui-nav-img">
							登录名
						</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="#">
									<i class="layui-icon layui-icon-about"></i>个人信息
								</a>
							</dd>
							<dd>
								<a href="#">密码修改</a>
							</dd>
							<dd>
								<a href="#">头像上传</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="#">退出系统<span class="layui-badge-dot"></span></a>
					</li>
				</ul>
			</div>
			<div class="layui-side layui-bg-black">
				<div class="layui-side-scroll">
					<ul class="layui-nav layui-nav-tree layui-inline layui-bg-black" id="menu"
						lay-filter="menuNav">
						<li class="layui-nav-item" style="background-color: #009688;">
							<a href="#" src="/home">
								<!--<img src="img/header.jpg" class="layui-nav-img" style="width: 60px;height: 60px;">-->
								<i class="layui-icon layui-icon-home"></i>&nbsp;&nbsp;
								系统首页
							</a>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a href="#"><i class="layui-icon layui-icon-set"></i>&nbsp;&nbsp;系统管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a href="#"><i class="layui-icon layui-icon-util"></i>&nbsp;&nbsp;系统设置</a>
								</dd>
								<dd>
									<a href="#" src="/dsc/index"><i class="layui-icon layui-icon-template-1"></i>&nbsp;&nbsp;数据库配置</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a href="#"><i class="layui-icon layui-icon-unlink"></i>&nbsp;&nbsp;爬虫管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a href="#" src="/sc/index"><i class="layui-icon layui-icon-util"></i>&nbsp;&nbsp;爬虫列表</a>
								</dd>
								<dd>
									<a href="#" src="/mc/index"><i class="layui-icon layui-icon-template-1"></i>&nbsp;&nbsp;电影数据</a>
								</dd>
								<dd>
									<a href="#"><i class="layui-icon layui-icon-template-1"></i>&nbsp;&nbsp;图片数据</a>
								</dd>
								<dd>
									<a href="#" src="http://www.hao123.com"><i class="layui-icon layui-icon-template-1"></i>&nbsp;&nbsp;购物数据</a>
								</dd>
								<dd>
									<a href="javascript:void(0)" src="http://www.baidu.com"><i class="layui-icon layui-icon-template-1"></i>&nbsp;&nbsp;天气数据</a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>

			</div>
			<div class="layui-body layui-bg-gray">
				<iframe id="center" src="/home" scrolling="auto" frameborder="no" style="width: 100%;height: 99.7%;min-height: 300px;"></iframe>
			</div>
			<div class="layui-footer">
				<div style="text-align: center;">
					&copy;hqj.com 2020-2021
				</div>
			</div>
		</div>
		<th:block th:include="include :: footer"/>
		<script>
			var $;
			layui.use(['element','layer'],function(){
				var element = layui.element,layer = layui.layer;
				$ = layui.jquery;

				element.on('nav(menuNav)',function(ele){
					var src = $(ele).attr('src');
					var text = ele.text();
					$('#center').attr('src',src);
					//autoHeight();
				});
				element.on('nav(topNav)',function(ele){
					var text = ele.text();
					if(text=='帮助文档'){
						layer.open({
							type:2,
							title:'帮助文档',
							content:'help.html',
							zIndex:layer.zIndex,
							area:['350px','950px'],
							offset:'rt',
							shade:[0.5,'#393d49'],
							id:'help',
							anim:2
						});
					}else if(text=='退出系统'){
						layer.confirm('是否真的要退出系统?',{icon:3,title:'系统提示'},function(index){
							alert('执行退出系统，回到首页，销毁会话');
							layer.close(index);
						});
					}else{
						var src = $(ele).attr('src');
						$('#center').attr('src',src);
					}
				});
			});

		</script>
	</body>
</html>
